
<?php
	$this->load->helper("form");
	$url = $this->config->item('base_url');
	$currentlang = $this->lang->languageCode();
	
	// Messages
	$message = $this->session->flashdata("message");
	if(!empty($message)){
		echo "<div class='message-success'>";
		echo $message;
		echo "</div>";
	}
	
	echo form_open($url.$currentlang.'/user/edit');
	
	
?>
<div class="main-page-content">
	<div style="width:400px; text-align: center;font-weight:bold;">
		<label><?php echo $this->lang->line('lang.edit.user.title');?></label>
	</div>
	<br/>
	<table>
		<tr>
			<td>
				<label><?php echo $this->lang->line('lang.edit.user.name');?></label>
			</td>
			<td>
				<input type="text" class="default-field-focus" name="name" size="40" value="<?php if(isset($name)){echo $name;}?>"/>
			</td>
		</tr>
		<tr>
			<td>
				<label><?php echo $this->lang->line('lang.edit.user.password');?></label>
			</td>
			<td>
				<input type="password" name="newpassword" size="40" value="<?php if(isset($password)){echo $password;}?>"/>
			</td>
		</tr>
		<tr>
			<td>
			</td>
			<td style="float:right;">
				<input type="submit" value="<?php echo $this->lang->line('lang.edit.user.button');?>" class="button-submit" />
			</td>
		</tr>
	</table>
	
</form>
</div>
<script type='text/javascript'>
			(function(){
				document.getElementsByClassName('default-field-focus')[0].focus();
			})();
		</script>